Carbon


CreateWindowFromCollection

Header: MacWindows.h Carbon status: Supported

Creates a window from collection data.

OSStatus CreateWindowFromCollection (
    Collection collection, 
    WindowRef *outWindow
);
collection

A reference to the collection to be used in creating the window. You pass a reference to a previously created collection, such as that returned by the Collection Manager function NewCollection. The collection used to create the window must contain the required items for a resource of type ‘wind’ or window creation fails.

outWindow

On input, a pointer to a value of type WindowPtr. On return, the window pointer points to the newly created window.

function result

A result code.

DISCUSSION

The CreateWindowFromCollection function creates a window invisibly and places it at the front of the window list. After calling CreateWindowFromCollection, you should set any desired associated data—using Window Manager or Control Manager accessor functions—then call the function TransitionWindow to display the window. The number of references to the collection (that is, its owner count) is incremented by a minimum of one for the duration of this call.

VERSION NOTES

This function is available with Mac OS 8.5 and later.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when WindowsLib 8.5 or later is installed. Exported by CarbonLib 1.0 and later and by WindowsLib 8.5 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)